<!DOCTYPE html
		PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
		"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
	<meta content="text/html; charset=UTF-8" http-equiv="Content-Type" />
	<title><?=$page->Wordlets->GetWordlet('root_title')?><?=( $page->Wordlets->GetWordlet('page_title') ) ? ' - ' . $page->Wordlets->GetWordlet('page_title') : ''?></title>
	<? $page->RenderCssFiles('global.css') ?>
	<link rel="icon" type="image/png" href="/favicon.ico"/>

<? $page->IncludeJsFile('jsload.js') ?>

<? /* <script type="text/javascript">
var ljs = function(script, reqs) {
	// TODO: make reqs an array if not
	var func = function() {
		var ready = true;
		if ( reqs ) {
			for ( var i=0; i<reqs.length; i++ ) {
				eval('var val = typeof ' + reqs[i]);
				if ( val == 'undefined' ) {
					ready = false;
					break;
				}
			}
		}

		if ( ready ) {
			(function() {
				var s = document.createElement('script');
				s.src = script;
				document.documentElement.firstChild.appendChild(s);
			})();
		} else {
			setTimeout(func, 100);
		}
	}

	func();
}
</script> */ ?>
</head>
<body id="<?=$page->BodyId?>" class="<?=$page->BodyClass?> <?=$page->Code?>">
<script type="text/javascript">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-680220-3']);
_gaq.push(['www.mysmilies.com']);
_gaq.push(['_trackPageview']);

(function() {
	var ga = document.createElement('script');
	ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 
		'http://www') + '.google-analytics.com/ga.js';
		ga.setAttribute('async', 'true');
	document.documentElement.firstChild.appendChild(ga);
})();
</script>

<script type="text/javascript">
jsload.add('http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery<?=($page->M->Get('minify_js')?'.min':'')?>.js');
<? //jsload.add(['http://i0.mysmilies.com/js/modal.jquery.js', 'http://i0.mysmilies.com/js/dropdown.jquery.js']); ?>
jsload.add(['<? $page->RenderJsFiles(array('jquery.cookie.js','dropdown.jquery.js','modal.jquery.js' /*,'scrollbarWidth.jquery.js','carousel.jquery.js'*/ )) ?>']);
</script>

<? if ( !$page->EditMode ) { ?>
	<script type="text/javascript">
		jsload.add('<? $page->RenderJsFiles('global.js') ?>');
	</script>
	<? // <script type="text/javascript" src="/js/global.js"></script> ?>
<? } ?>
<? if ( $page->EditMode || $page->CmsAccess ) { ?>
	<script type="text/javascript" src="/js/autosize.jquery.js"></script>
	<script type="text/javascript" src="/js/datetime.jquery.js"></script>
	<script type="text/javascript" src="/js/jquery.form.js"></script>
	<script type="text/javascript" src="/js/gcms.js"></script>
	<link rel="stylesheet" type="text/css" href="/css/gcms.css" />
	<link rel="stylesheet" type="text/css" href="/css/datetime.css" />
<? } ?>

<? if ( count($page->JsFiles) ): ?>
	<script type="text/javascript">
	jsload.add('<? $page->RenderJsFiles($page->JsFiles) ?>');
	</script>
<? endif ?>

<? /*
<script type="text/javascript">
	ljs('/js/jquery-1.4.1.js');
	ljs('http://i6.mysmilies.com/js/modal.jquery.js', ['jQuery']);
	ljs('http://i6.mysmilies.com/js/dropdown.jquery.js', ['jQuery']);
</script>
<? /* <script type="text/javascript" src="/js/jquery-1.4.1.js"></script>
<script type="text/javascript" src="/js/modal.jquery.js"></script>
<script type="text/javascript" src="/js/dropdown.jquery.js"></script> * / ?>
<? if ( !$page->EditMode ) { ?>
	<script type="text/javascript">
		ljs('http://i0.mysmilies.com/js/global.js', ['jQuery', 'jQuery.modal', 'jQuery.dropdown']);
	</script>
	<? // <script type="text/javascript" src="/js/global.js"></script> ?>
<? } ?>
<? if ( $page->EditMode || $page->CmsAccess ) { ?>
	<script type="text/javascript" src="/js/autosize.jquery.js"></script>
	<script type="text/javascript" src="/js/datetime.jquery.js"></script>
	<script type="text/javascript" src="/js/jquery.form.js"></script>
	<script type="text/javascript" src="/js/gcms.js"></script>
	<link rel="stylesheet" type="text/css" href="/css/gcms.css" />
	<link rel="stylesheet" type="text/css" href="/css/datetime.css" />
<? } ?>
*/ ?>



<!-- GCMS -->
<? if ( $page->CmsAccess ) { ?>
	<div id="gcms_bar">
		<ul>
			<li><a href="<?=$page->GcmsEditModeLink?>">Edit This Page</a></li>
			<li><a href="<?=$page->GcmsLink?>">LADE CMS</a></li>
			<li><a href="<?=$page->GcmsLogoutLink?>">Logout</a></li>
		</ul>
	</div>
<? } elseif ( $page->EditMode ) { ?>
	<div id="gcms_bar">
		<ul>
			<li><a href="<?=$page->GcmsEditModeOffLink?>">Leave Edit Mode</a></li>
			<li><a href="<?=$page->GcmsLink?>">LADE CMS</a></li>
			<li><a href="<?=$page->GcmsLogoutLink?>">Logout</a></li>
		</ul>
		<div id="gcms_vars">
			<? foreach( $page->Wordlets->InvalidSections as $isection ) { ?>
				<p>
					<strong>Warning: The section '<?=$isection?>' does not exist.</strong>
					<span class="gcms_list_item">
						<a class="gcms_link" href="/lade/add?section=section&name=<?=$isection?>">Add '<?=$isection?>'</a>
					</span>
				</p>
			<? } ?>
			<p>
				Site Title: <?=$page->Wordlets->Get('root_title')?>
			</p>
			<p>
				Page Title: <?=$page->Wordlets->Get('page_title')?>
			</p>
		</div>
	</div>
<? } ?>
<!-- /GCMS -->

<div id="header">
	<div id="header_content">
		<h1><a href="/">Welcome to Mysmilies.com, your source for smilies(smileys)/emoticons and game sprites!</a></h1>
		<div id="topad">
			<a href="http://tshirtpatch.com" target="_blank"><img src="http://smilearchive.com/s/468X60advert.jpg" width="468" height="60" alt="TshirtPatch" /></a>
		</div>
		<hr/>
	</div>
</div>

<div id="nav">
	<form id="search_form">
		<fieldset>
			<p id="text_nav" class="input text"><input type="text" name="search" /></p>
			<p id="submit_nav">
				<span class="jelly">
					<span class="start"></span>
					<span class="bg"></span>
					<span class="end"></span>
					<input type="submit" class="text" value="Search">
				</span>
			</p>
		</fieldset>
	</form>
	<? if ( $page->User ): ?>
		<p id="welcome">Welcome back, <?=$page->User->Dname()?>! (<a href="<?=$page->GetUrl('logout', 'back_url=' . urlencode($page->Url))?>">logout</a>)</p>
	<? endif ?>
	<ul>
	<? /* <h3><a name="settings">Settings</a></h3>
	<div class="content">
		<? if ( $page->Options['number'] ): ?>
		<h5>Smilies/Page</h5>
		<ul class="prefs">
			<? foreach ( $page->Options['number'] as $pref ): ?>
				<li>
				<? if ( $page->GetPref('number') == $pref ): ?>
					<em><?=$pref?></em>
				<? else: ?>
					<a href="?number=<?=$pref?>" class="cmwSetCookie"><?=$pref?></a>
				<? endif ?>
				</li>
			<? endforeach ?>
		</ul>
		<? endif ?>

		<? if ( $page->Options['code'] ): ?>
		<h5>Code</h5>
		<ul class="prefs">
			<? foreach ( $page->Options['code'] as $pref => $pref_label ): ?>
				<li>
				<? if ( $page->GetPref('code') == $pref ): ?>
					<em><?=$pref_label?></em>
				<? else: ?>
					<a href="?code=<?=$pref?>" class="cmwSetCookie"><?=$pref_label?></a>
				<? endif ?>
				</li>
			<? endforeach ?>
		</ul>
		<? endif ?>

		<? if ( $page->Options['box'] ): ?>
		<h5>Code Boxes</h5>
		<ul class="prefs">
			<? foreach ( $page->Options['box'] as $pref => $pref_label ): ?>
				<li>
				<? if ( $page->GetPref('box') == $pref ): ?>
					<em><?=$pref_label?></em>
				<? else: ?>
					<a href="?box=<?=$pref . (( isset($page->PageNumber) )? '&pnum=' . $page->PageNumber:'')?>" class="cmwSetCookie"><?=$pref_label?></a>
				<? endif ?>
				</li>
			<? endforeach ?>
		</ul>
		<? endif ?>
	</div> */ ?>

		<? if ( !$page->User ): ?>
			<li>
				<h5>Login</h5>
				<ul>
					<li>
						<form action="<?=$page->LoginUrl?>" method="post">
							<p id="login_username" class="input text">
								<label for="username">Username:</label>
								<input type="text" name="username" id="username" />
							</p>
							<p id="login_password" class="input text">
								<label for="password">Password:</label>
								<input type="password" name="password" id="password" />
							</p>
							<p class="input submit"><input type="submit" value="Login" /></p>
						</form>
					</li>
				</ul>
			</li>
			<li>
				<h5>Register</h5>
				<form action="<?=$page->RegisterUrl?>">
					<ul>
						<li>
							<p class="input text">
								<label for="semail">E-Mail:</label>
								<input type="text" name="semail" id="semail" />
							</p>
						</li>
						<li>
							<p class="input text">
								<label for="susername">Username:</label>
								<input type="text" name="susername" id="susername" />
							</p>
						</li>
						<li>
							<p class="input password">
								<label for="spassword">Password:</label>
								<input type="password" name="spassword" id="spassword" />
							</p>
						</li>
						<li>
							<p class="input submit"><input type="submit" value="Sign Up" /></p>
						</li>
					</ul>
				</form>
			</li>
		<? endif ?>
		<li>
			<h5>How To</h5>
			<ul>
				<li><a href="<?=$page->GetUrl('page/howto')?>">Use Smilies</a></li>
				<li><a href="<?=$page->GetUrl('page/howtoemail')?>">Use in Email</a></li>
				<li><a href="<?=$page->GetUrl('page/tips')?>">Make Smilies</a></li>
				<li><a href="<?=$page->GetUrl('page/linktome')?>">Link to me</a></li>
				<li><a href="<?=$page->GetUrl('page/trade')?>">Get Linked</a></li>
				<li><a href="<?=$page->GetUrl('')?>page/faq">FAQ</a></li>
			</ul>
		</li>
		<li>
			<h5>More Smilies</h5>
			<ul>
				<li><a href="<?=$page->GetUrl('pages/aim')?>">Aim Icons</a></li>
				<li><a href="<?=$page->GetUrl('page/trade')?>" target="_top">Other sites</a></li>
				<li><a href="<?=$page->GetUrl('')?>page/wallpaper">Smiley Wallpapers</a></li>
			</ul>
		</li>
		<li>
			<h5>Community</h5>
			<ul>
				<li><a href="/cwmb/index.php" target="_blank">Forum</a></li>
			</ul>
		</li>
		<li>
			<h5>Hosting Smilies</h5>
			<ul>
				<li><a href="http://tshirtpatch.com/" target="_blank">Tshirtpatch.com</a></li>
				<li><a href="http://forsakenclans.com/" target="_blank">ForsakenClans.com</a></li>
				<li><a href="http://blazemint.com" target="_blank">Blazemint.com</a></li>
				<li><a href="http://crowd9.com/" target="_blank">crowd9.com</a></li>
			</ul>
		</li>
	</ul>
	<hr/>
</div>

<div id="wrapper">
	<div id="left" class="column">
		<h3><a name="tags">Top Tags</a></h3>
		<div class="content">
			<ol>
				<? foreach ( $page->Tags() as $tag ):?>
					<li>
						<a href="<?=$tag->Url()?>">
							<? if ( ($img = $tag->Img()) ):?>
								<img src="<?=$img['img_src']?>" width="<?=$img['img_width']?>" height="<?=$img['img_height']?>" />
							<? endif?>
							<?=$tag->Name()?>
						</a>
						(<?=$tag->Values['count']?>)
					</li>
				<? endforeach?>
			</ol>

			<ul id="archive_types">
				<li><a href="<?=$page->GetUrl('')?>smileys/Categories/">Categories</a></li>
				<li><a href="<?=$page->GetUrl('')?>smileys/Users/">Users</a></li>
			</ul>
		</div>
	</div>

	<div id="right" class="column">
		<h3><a name="stuff">Stuff</a></h3>
		<div class="content">
			<div id="paypal" class="container">
				<h5>Keep This Site Free</h5>
				<form action="https://www.paypal.com/cgi-bin/webscr" method="post" target="_top" class="content">
					<input name="cmd" value="_xclick" type="hidden">
					<input name="business" value="wackoburns@hotmail.com" type="hidden">
					<input name="item_name" value="PayPal Donation" type="hidden">
					<input name="item_number" value="1" type="hidden">
	
					<input src="http://mysmilies.com/other/donate.gif" name="submit" alt="Make payments with PayPal - it's fast, free and secure!" border="0" type="image">
				</form>
			</div>
	
			<div id="centerad" class="container"></div>
	
			<div id="set_code" class="code container">
				<h5>Change Code</h5>
				<div class="content">
					<p class="html">
						<a href="<?=$page->SetCodeBbUrl?>">(bb code)</a>
					</p>
					<p class="ubb">
						<a href="<?=$page->SetCodeHtmlUrl?>">(html)</a>
					</p>
				</div>
			</div>

			<? if ( $page->User ): ?>
				<div id="favorites" class="container">
					<h5>Favorites <a href="<?=$page->GetUrl('edit_favorites')?>">(edit)</a></h5>
					<ul>
						<? if ( $page->Favorites() ): ?>
							<? foreach ( $page->Favorites()->Values as $smiley ): ?>
								<li class="smiley favorite">
									<p class="image">
										<img src="<?=$smiley->Url()?>" width="<?=$smiley->Width()?>" height="<?=$smiley->Height()?>" />
									</p>
									<div class="code" title="Click to hilight and copy">
										<p class="html">
											<input type="text" value="<?=htmlentities('<img src="' . $smiley->Url() . '" />')?>" />
										</p>
										<p class="ubb">
											<input type="text" value="[img]<?=$smiley->Url()?>[/img]" />
										</p>
									</div>
								</li>
							<? endforeach ?>
						<? endif ?>
					</ul>					
				</div>
			<? endif ?>
		</div>
	</div>

	<div id="center" class="column">
		<h2><a name="top"><?=$page->Title?></a></h2>
		<div class="content">
			<?=$content?>
			<hr/>
		</div>
	</div>

	<hr/>

	<? /* <div id="smileytbox">
		<form name="smileyform" id="smileyform">
			<fieldset>
				<label for="smileytext">Click a smiley</label>
				<input type="text" id="smileytext" value="" />
				<label for="smileytext">and copy the code :)</label>
			</fieldset>
		</form>
	</div> */ ?>
</div>

<div id="footer">
	<p>
	Design and code Copyright &copy; 1999-<?=date('Y') ?> by <a href="mailto:wackoburns@hotmail.com">cwm</a>. 
	All smilies in cwm's section are also copyright by cwm (Gerald Burns). 
	All other smilies are copyright by their respective owners and should not be downloaded unless previous permission has been given. 
	</p>
</div>

<div id="faux_centerad">
<script type="text/javascript"><!--
google_ad_client = "pub-3955098532729911";
//siterelated
google_ad_slot = "0956728380";
google_ad_width = 120;
google_ad_height = 90;
//--></script>
<script type="text/javascript" src="http://pagead2.googlesyndication.com/pagead/show_ads.js"></script>
</div>
<script type="text/javascript">
	var faux_centerad = document.getElementById('faux_centerad');
	document.getElementById('centerad').innerHTML = faux_centerad.innerHTML;
	faux_centerad.innerHTML = '';
</script>

<!-- script src="http://thisnext.mysmilies.com/multivariate/?js=1"></script -->

</body>
</html>